package com.rainy.cloud.gateway.result;

import java.io.Serializable;

/**
 * @author user
 */
public class Response implements Serializable {
    private String code;
    private String errMsg;
    private Object data;
    private Long timestamp;

    public Response(String code, String errMsg, Object data, Long timestamp) {
        this.code = code;
        this.errMsg = errMsg;
        this.data = data;
        this.timestamp = timestamp;
    }

    public Response() {
        timestamp = System.currentTimeMillis();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
}
